#include "messageRounter.hpp"
#include "udpServer.hpp"
#include "addrin.hpp"
#include <string>

int main(int argc,char* argv[])
{
    if(argc!=2)
    {
        std::cout<<"请输入要开发的端口号"<<std::endl;
        return 1;
    }

    uint16_t port = std::stoi(argv[1]);
    MessageRounter* messageround = new MessageRounter;
    auto func = std::bind(&MessageRounter::rounter,messageround,std::placeholders::_1,std::placeholders::_2,std::placeholders::_3);
    UdpServer udpsvr(port,func);
    udpsvr.start();
    return 0;
}